<?php

/**
 * Monitor form base class.
 *
 * @package    stock
 * @subpackage form
 * @author     Your name here
 */
class BaseMonitorForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'           => new sfWidgetFormInputHidden(),
      'stock_id'     => new sfWidgetFormInput(),
      'code'         => new sfWidgetFormInput(),
      'profit_price' => new sfWidgetFormInput(),
      'loss_price'   => new sfWidgetFormInput(),
      'status'       => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'id'           => new sfValidatorPropelChoice(array('model' => 'Monitor', 'column' => 'id', 'required' => false)),
      'stock_id'     => new sfValidatorInteger(),
      'code'         => new sfValidatorString(array('max_length' => 50)),
      'profit_price' => new sfValidatorNumber(),
      'loss_price'   => new sfValidatorNumber(),
      'status'       => new sfValidatorInteger(),
    ));

    $this->widgetSchema->setNameFormat('monitor[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Monitor';
  }


}
